import { mapGetters, mapActions } from "vuex";
import enUS from "vant/es/locale/lang/en-US";
import zhCN from "vant/es/locale/lang/zh-CN";
import jaJP from "vant/es/locale/lang/ja-JP";

export default Vue => {
  Vue.mixin({
    data() {
      return {
        locales: [
          { name: "中文", value: "zh-CN", locale: zhCN },
          { name: "中文繁体", value: "zh-TW", locale: zhCN },
          { name: "English", value: "en-US", locale: enUS },
          { name: "한국어", value: "ko-KR", locale: enUS },
          { name: "日本語", value: "ja-JP", locale: jaJP }
        ]
      };
    },
    computed: {
      ...mapGetters(["walletAddress"])
    },
    methods: {
      ...mapActions(["connectMetaMask"])
    }
  });
};
